﻿using System.Collections.ObjectModel;
using Microsoft.Practices.Composite.Events;
using StockholmsStad.Windows.UI.Modules.Ceremony.Interfaces;
using System.Collections.Generic;
using StockholmsStad.Runtime.Serialization.DataContract;

namespace StockholmsStad.Windows.UI.Modules.Ceremony.Views
{
    /// <summary>
    /// Interaction logic for CeremonyView.xaml
    /// </summary>
    public partial class CeremonyView : ICeremonyView
    {
        public CeremonyView()
        {
            InitializeComponent();
        }

        #region ICeremonyView Members

        public void SetContent(ICeremonyListView listView)
        {
            HeaderPanel.Content = listView;

            listView.CeremonySelected -= listView_CeremonySelected;
            listView.CeremonySelected += listView_CeremonySelected;
        }

        void listView_CeremonySelected(object sender, DataEventArgs<Models.CeremonySummaryPresentationModel> e)
        {
        }

        public void SetFreeTimeBlocks(List<TimeBlock> freeTimeBlocks)
        {
            var listView = (CeremonyListView) HeaderPanel.Content;
            listView.FreeTimeBlocks = freeTimeBlocks;
        }

        #endregion
    }
}
